package View;
import java.awt.Graphics;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;

import Controller.ButtonListener;
import Model.Sign;
import Model.User;

//登录界面
/**
 * 
 * @author A
 *
 */

public class LoginUi extends JFrame implements GoBangconfig{
	public ArrayList<User> userList=new ArrayList<User>();
	
	public void initUi(){
		this.setTitle("五子棋登录界面");
		this.setSize(UIWIDTH,UIHIGHTH);
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(3);
		this.setResizable(false);
		//设置顶级容器JFrame为框架布局
		this.setLayout(null);

		
		JButton buttonLogin=new JButton("进入游戏界面",LOGINBUTTON);
		buttonLogin.setBounds(550,680,dim2.width,dim2.height);
		this.add(buttonLogin);
		
		ButtonListener bu=new ButtonListener(this);
		buttonLogin.addActionListener(bu);
		this.setVisible(true);
	}
	
	/**重写重绘方法
	 *
	 */
	public void paint(Graphics g){
		super.paint(g);
		g.drawImage(LOGINPICTURE, 0, 0,this.getWidth(), this.getHeight(), this);
	}
	
	/**主函数入口
	 * 
	 */
	public static void main(String args[]) {
	
	    Sign sign = new Sign();
		sign.signInterface();

	}
}
